package com.wanxi.service.impl;

import com.wanxi.mapper.DataMapper;
import com.wanxi.model.*;
import com.wanxi.service.DataService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

@Service
public class DataServiceImpl implements DataService {
    @Autowired
    DataMapper dataMapper;
    @Override
    public List<Gender> getGenderList() {
        return dataMapper.getGenderList();
    }

    @Override
    public List<Degree> getDegreeList() {
        return dataMapper.getDegreeList();
    }

    @Override
    public List<Status> getStatusList() {
        return dataMapper.getStatusList();
    }

    @Override
    public List<Enable> getEnableList() {
        return dataMapper.getEnableList();
    }

    @Override
    public List<Role> getRoleList() {
        return dataMapper.getRoleList();
    }

    @Override
    public List<Team> getTeamList() {
        return dataMapper.getTeamList();
    }

    @Override
    public List<SignStatus> getSignStatus() {
        return dataMapper.getSignStatus();
    }

    @Override
    public SignStatus getSignStatusByCode(String code) {
        return dataMapper.getSignStatusByCode(code);
    }

    @Override
    public Map getDataList() {
        Map map = new HashMap();
        map.put("gender",dataMapper.getGenderList());
        map.put("degree",dataMapper.getDegreeList());
        map.put("status",dataMapper.getStatusList());
        map.put("enabled",dataMapper.getEnableList());
        map.put("team",dataMapper.getTeamList());
        map.put("role",dataMapper.getRoleList());
        return map;
    }
}
